import request from '@/util/request.js'
import { useTokenStore } from '@/stores/token';
export const articleCategoryListService=()=>{
    //const tokenStore = useTokenStore();
    //return request.post('/category',{headers:{'Authorization':tokenStore.token}});
    return request.get('/category');

}

export const articleCategoryAddService = (categoryData)=>{
    return request.post('/category',categoryData)

}
export const articleCategoryUpdateService = (categoryData)=>{
    return request.put('/category',categoryData)

}
export const articleCategoryDeleteService = (id)=>{
    return request.delete('/category?id='+id)

}
//文章列表查询
export const articleListService=(params)=>{
    return request.get('/article',{params:params})
}
//添加文章
export const articleAddService = (articleModel)=>{
    return request.post('/article',articleModel)
}